package com.pandy.seckill.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 秒杀商品库存表
 * </p>
 *
 * @author pandy
 * @since 2025-04-08
 */
@Getter
@Setter
@TableName("seckill_segment_stock")
public class SeckillSegmentStock implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId("id")
    private Long id;

    /**
     * 商品id
     */
    @TableField("sku_id")
    private Long skuId;

    /**
     * 剩余库存
     */
    @TableField("stock_count")
    private Integer stockCount;

    /**
     * 原始库存
     */
    @TableField("raw_stock_count")
    private Integer rawStockCount;

    /**
     * 分段编号
     */
    @TableField("segment_index")
    private Integer segmentIndex;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("updated_time")
    private LocalDateTime updatedTime;

}
